import http from '@/utils/http';

const stock = {
  //库存管理视图
  query(params: any) {
    let url = '/Stock/Query';
    return http.post(url, params);
  },
  //库存管理保存
  save(params: Object) {
    let url = '/Stock/Save';
    return http.post(url, params);
  },
  //下载批量模版
  downLoadBatchXYTemplate(params: Object) {
    let url = '/Stock/DownLoadBatchXYTemplate';
    return http.postDownload(url, params);
  },
  //下载单个模版
  downLoadXYTemplate(params: Object) {
    let url = '/Stock/DownLoadXYTemplate';
    return http.postDownload(url, params);
  },
  //其他出入库
  batchAccess(params: Object) {
    let url = '/Stock/BatchAccess';
    return http.upload(url, params);
  },
  //基本库存修改
  basicStockModify(params: Object) {
    let url = '/Stock/BasicStockModify';
    return http.upload(url, params);
  },
  //导出
  export(params: Object) {
    let url = '/Stock/Export';
    return http.postDownload(url, params);
  },
  //导出明细
  exportDetail(params: Object) {
    let url = '/Stock/ExportDetail';
    return http.postDownload(url, params);
  },
  //导出现时库存
  exportCurrentStock(params: Object) {
    let url = '/Stock/ExportCurrentStock';
    return http.postDownload(url, params);
  },
};
export default stock;
